package com.terrier.net.events
{
    import flash.events.Event;

    /**
     * SocketEvent
     * @author Jarvis.weng
     */
    public class WxSocketEvent extends Event
    {
        /**
         * 定义 socket_data 事件对象的 type属性值
         * @default
         */
        public static const SOCKET_DATA:String = "socketData";

        private var _data:*;

        /**
         * 构造函数
         * @param type
         * @param data
         * @param bubbles
         * @param cancelable
         */
        public function WxSocketEvent(type:String,
                                      data:*,
                                      bubbles:Boolean = false,
                                      cancelable:Boolean = false)
        {
            super(type, bubbles, cancelable);
            _data = data;
        }

        /**
         * 接收到的数据
         * @return
         */
        public function get data():*
        {
            return _data;
        }
    }
}
